package com.bwie.system.service.impl;

import com.bwie.common.domain.Admin;
import com.bwie.system.mapper.UserMapper;
import com.bwie.system.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class UserServiceImpl implements UserService {

    @Resource
    private UserMapper mapper;

    @Override
    public Admin findByAdminPhone(String adminPhone) {
        if (adminPhone.equals("")){
            throw new RuntimeException("手机号不能为空");
        }
        Admin phone = mapper.findByAdminPhone(adminPhone);
        return phone;
    }
}
